<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/project/ui-res-v3.css">
<link rel="stylesheet" href="css/project/ui-input-v3.css">
<link rel="stylesheet" href="css/project/ui-color-v3.css">
<link rel="stylesheet" href="css/project/style.css">
<link rel="stylesheet" href="css/ui-base.css">
<link rel="stylesheet" href="css/ui-img.css?v=202022">
<link rel="stylesheet" href="css/ui-box.css?v=202022">
<link rel="stylesheet" href="css/ui-color.css?v=202022">
<link rel="stylesheet" href="css/lbbbase.css">
<link rel="stylesheet" href="css/zv_common.css">

<style>
    .center{
        margin: 0 auto;
    }
    .w60{width:5.0em;}
    .E5E3E0{background-color:#E5E3E0;}
    .border{
        border: 1px solid #D0CCC7;
    }
    .mb3{margin-bottom:.5em;}
    
    .res{
        background-image:url('images/clock.png');
    }
    .res_rec{
        background-image:url('images/arrr2.png');
    }
    .top10{
        top:1em;
    }
    .bd_b{
        border-bottom: solid 1px #D6D3CE;
    }
    .uhide {
    display: none !important;
}
    .zformat{white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
</style>
</head>
<body class="um-vp c-wh" ontouchstart>
<div id="page_0" class="up ub ub-ver" tabindex="0">
    <!-- 内容 -->
    <div id="content" class="content top10">
         <ul> 
             <li class="ub bd_b lh13 fs9 ml6 mr6 uhide" id="0" onclick="openPage(this.id)"> 
                   <div class="pb8 pt8 ">  
                      <div class="ub c75 mb3">
                           <div class="ub-img5 w26 res"></div>
                           <div class="" date>-</div>
                      </div> 
                      <div class="ub wtp100">
                           <div class="c0 zformat ub-f3 w121" title>-</div>  
                           <div class="ub-f1 tx-r w46" isPass>&nbsp;&nbsp;&nbsp;&nbsp;</div>
                           <div class="ub-f1 ub-img5 w20 res_rec "></div>  
                      </div>                             
                   </div>
              </li>
         </ul> 
    </div>
</div>

<script src="js/appcan.js"></script>
<script src="js/zy_control.js?v=202022"></script>
<script src="js/zy_click.js?v=202022"></script>
<script src="js/jquery-1.11.1.min.js?v=202022"></script>
<script src="js/main.js?v=202022"></script>
<script src="js/apply.js?v=202022"></script>
<script>
zy_init();
window.uexOnload = function(type){
    if (!type) {
         exitreturn();
         init();
         // queryUserDutysFuc(function(json){userDutys(json);});
    };
}; 
var listr=$(
            '<li class="ub bd_b lh13 fs9 ml6 mr6 uhide" id="0" onclick="openPage(this.id)">'+
                   '<div class="pb8 pt8">'+
                      '<div class="ub c75 mb3">'+
                           '<div class="ub-img5 w26 res"></div>'+
                           '<div class="" date></div>'+
                      '</div>'+
                      '<div class="ub wtp100">'+
                           '<div class="c0 zformat ub-f3 w121" title></div>'+  
                           '<div class="ub-f1 tx-r w46" isPass></div>'+
                           '<div class="ub-f1 ub-img5 w20 res_rec "></div>'+  
                      '</div>'+                             
                   '</div>'+
              '</li>'
              );
function init() {
  // alert("init")
 $("ul").empty();
 $("ul").append(listr.clone());
  queryUserDutysFuc(function(json){userDutys(json);});
}
function userDutys(json){
    if(json.status==0)
    {
        var userDutysArr=json.data.userDutys;
        // console.log(userDutysArr)
        var len=userDutysArr.length;
        var elem, clone = $("ul>li:first");
        for(var i=0;i<len;i++)
        {
            elem = clone.clone().removeClass("uhide");
            if(userDutysArr[i].dutyType=="请休假申请")
            {
                elem.attr({
                    "id" : userDutysArr[i].dutyId,
                    "taskId" : userDutysArr[i].dutyId,
                });
                elem.find("[title]").text(userDutysArr[i].dutyName);
                var time = new Date(userDutysArr[i].createTime.time);
                elem.find("[date]").text(getTimeStr(time));
               $("ul").append(elem); 
            }
            
        }
    }
}

function openPage(taskid)
{
    // alert(taskid)
    localStorage.setItem("applyTaskid",taskid);
    // openNewWin('applyProcess', 'applyProcess.html?'+Math.random());
     appcan.window.open({
                    name:'applyProcess'+taskid,
                    dataType:0,
                    data:'applyProcess.html?'+taskid
                 });
}
</script>
</body>
</html>